package com.briup.cms.web.controller;

import com.briup.cms.bean.Carousel;
import com.briup.cms.service.ICarouselService;
import com.briup.cms.utils.Message;
import com.briup.cms.utils.MessageUtil;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author lining
 * @Date 2021/7/18 16:09
 * @Version 1.0.0
 */
@RestController
@RequestMapping("/auth/carousel")
public class CarouselController {
    @Autowired
    private ICarouselService service;
    @GetMapping("/page/query")
    public Message findAllCarouselByPage(int pageSize,int pageNum){
        PageInfo<Carousel> pageInfo = service.findAll(pageNum, pageSize);
        return MessageUtil.success(pageInfo);
    }
}
